<template>
	<view>
		<view class="notice" @click="handleGoAnnouncementList()">
			<view class="icon"><image src="../../static/imgs/icons/notice-icon.png" mode="widthFix"></image></view>
			<swiper class="swiper" :autoplay="true" :interval="scrollTime" :duration="1000" vertical>
				<swiper-item
					v-for="(item, index) in list"
					:key="index"
				>
					<view class="swiper-item">{{item.title}}</view>
				</swiper-item>
			</swiper>
		</view>
	</view>
</template>

<script>
	export default {
		props:{
			list: {
				type: Array,
				default(){
					return []
				},
			},
			scrollTime: {
				type: [Number,String],
				default() {
					return 3000
				}
			}
		},
		data() {
			return {
				// list: [],
				// scrollTime: 3000, //滚动间隔
			};
		},
		created() {
		},
		methods: {
			handleGoAnnouncementList() {
				uni.navigateTo({
					url: '../../pagesTravel/announcementList'
				});
			}
		}
	}
</script>

<style lang="scss" scoped>
.notice {
	width: 690rpx;
	margin: 0 auto;
	height: 80rpx;
	background-color: #FFFBF5;
	border-radius:12rpx;
	display: flex;
	align-items: center;
	padding: 0 22rpx;
	box-sizing: border-box;
	.icon {
		height: 44rpx;
		width: 44rpx;
		border-right: 1px solid #EBEBEB;
		padding-right: 22rpx;
	}
	.swiper {
		height: inherit;
		flex: 1;
		line-height: 80rpx;
		padding-left: 20rpx;
		font-size:28rpx;
		font-weight:500;
		color: #FFAF3C;
	}
}
</style>
